/*
 * EngineBase.h
 *
 *  Created on: Jan 27, 2013
 *      Author: Drew Prevost
 */

#ifndef ENGINEBASE_H_
#define ENGINEBASE_H_

#include <Protothread.h>
#include "Arduino.h"
#include "ThreadServoRate.h"

class ThreadEngineBase: public Protothread
{
public:
  ThreadEngineBase(
                    ThreadServoRate & threadServoExhaust,
                    uint8_t nPinGlowPlug,
                    uint8_t nPinGenConnect,
                    uint8_t nPinStarterMotor,
                    uint8_t nPinGenDisonnect,
                    uint8_t nPinGenMonitor );
  virtual ~ThreadEngineBase();

  virtual bool run() = 0;

protected:
  ThreadServoRate & threadServoExhaust;
  uint8_t nPinGlowPlug;
  uint8_t nPinGenConnect;
  uint8_t nPinStarterMotor;
  uint8_t nPinGenDisonnect;
  uint8_t nPinGenMonitor;
};

#endif /* ENGINEBASE_H_ */
